Optimal. Leaf size=134 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{2} \sqrt{a \sin (e+f x)+a}}\right )}{32 \sqrt{2} a^{3/2} f}+\frac{\cos (e+f x)}{32 f (a \sin (e+f x)+a)^{3/2}}+\frac{5 \sec (e+f x)}{8 a f \sqrt{a \sin (e+f x)+a}}-\frac{\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.223266, antiderivative size = 134, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {2712, 2855, 2650, 2649, 206} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{2} \sqrt{a \sin (e+f x)+a}}\right )}{32 \sqrt{2} a^{3/2} f}+\frac{\cos (e+f x)}{32 f (a \sin (e+f x)+a)^{3/2}}+\frac{5 \sec (e+f x)}{8 a f \sqrt{a \sin (e+f x)+a}}-\frac{\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2712
Rule 2855
Rule 2650
Rule 2649
Rule 206
Rubi steps
\begin{align*} \int \frac{\tan ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx &=-\frac{\sec (e+f x)}{4 f (a+a \sin (e+f x))^{3/2}}+\frac{\int \frac{\sec ^2(e+f x) \left (-\frac{3 a}{2}+4 a \sin (e+f x)\right )}{\sqrt{a+a \sin (e+f x)}} \, dx}{4 a^2}\\ &=-\frac{\sec (e+f x)}{4 f (a+a \sin (e+f x))^{3/2}}+\frac{5 \sec (e+f x)}{8 a f \sqrt{a+a \sin (e+f x)}}-\frac{1}{16} \int \frac{1}{(a+a \sin (e+f x))^{3/2}} \, dx\\ &=\frac{\cos (e+f x)}{32 f (a+a \sin (e+f x))^{3/2}}-\frac{\sec (e+f x)}{4 f (a+a \sin (e+f x))^{3/2}}+\frac{5 \sec (e+f x)}{8 a f \sqrt{a+a \sin (e+f x)}}-\frac{\int \frac{1}{\sqrt{a+a \sin (e+f x)}} \, dx}{64 a}\\ &=\frac{\cos (e+f x)}{32 f (a+a \sin (e+f x))^{3/2}}-\frac{\sec (e+f x)}{4 f (a+a \sin (e+f x))^{3/2}}+\frac{5 \sec (e+f x)}{8 a f \sqrt{a+a \sin (e+f x)}}+\frac{\operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{a+a \sin (e+f x)}}\right )}{32 a f}\\ &=\frac{\tanh ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{2} \sqrt{a+a \sin (e+f x)}}\right )}{32 \sqrt{2} a^{3/2} f}+\frac{\cos (e+f x)}{32 f (a+a \sin (e+f x))^{3/2}}-\frac{\sec (e+f x)}{4 f (a+a \sin (e+f x))^{3/2}}+\frac{5 \sec (e+f x)}{8 a f \sqrt{a+a \sin (e+f x)}}\\ \end{align*}
Mathematica [C] time = 0.443707, size = 128, normalized size = 0.96 \[ -\frac{\sec (e+f x) \left (-40 \sin (e+f x)-\cos (2 (e+f x))+(2+2 i) (-1)^{3/4} \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^4 \tanh ^{-1}\left (\left (\frac{1}{2}+\frac{i}{2}\right ) (-1)^{3/4} \left (\tan \left (\frac{1}{4} (e+f x)\right )-1\right )\right )-25\right )}{64 f (a (\sin (e+f x)+1))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.607, size = 202, normalized size = 1.5 \begin{align*}{\frac{1}{ \left ( 64+64\,\sin \left ( fx+e \right ) \right ) \cos \left ( fx+e \right ) f} \left ( \sin \left ( fx+e \right ) \left ( 2\,\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{2}}{\sqrt{a}}} \right ){a}^{2}+40\,{a}^{5/2} \right ) + \left ( -\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}}{2}\sqrt{a-a\sin \left ( fx+e \right ) }{\frac{1}{\sqrt{a}}}} \right ){a}^{2}+2\,{a}^{5/2} \right ) \left ( \cos \left ( fx+e \right ) \right ) ^{2}+2\,\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{2}}{\sqrt{a}}} \right ){a}^{2}+24\,{a}^{5/2} \right ){a}^{-{\frac{7}{2}}}{\frac{1}{\sqrt{a+a\sin \left ( fx+e \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.63547, size = 644, normalized size = 4.81 \begin{align*} \frac{\sqrt{2}{\left (\cos \left (f x + e\right )^{3} - 2 \, \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right )\right )} \sqrt{a} \log \left (-\frac{a \cos \left (f x + e\right )^{2} + 2 \, \sqrt{2} \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{a}{\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )} + 3 \, a \cos \left (f x + e\right ) -{\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} -{\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \,{\left (\cos \left (f x + e\right )^{2} + 20 \, \sin \left (f x + e\right ) + 12\right )} \sqrt{a \sin \left (f x + e\right ) + a}}{128 \,{\left (a^{2} f \cos \left (f x + e\right )^{3} - 2 \, a^{2} f \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a^{2} f \cos \left (f x + e\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan ^{2}{\left (e + f x \right )}}{\left (a \left (\sin{\left (e + f x \right )} + 1\right )\right )^{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \mathit{sage}_{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]